package com.zyg.order.controller;

import com.zyg.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ------------------------------
 * 作者: LMY
 * 类-功能: XX
 * 创建时间: 2021-11-12 20:12
 * ------------------------------
 **/
@RestController
@RefreshScope
public class HelloController {

    @Value("${base.user.name}")
    private String name;
    @Value("${base.user.age}")
    private int age;

    @RequestMapping("info")
    public R info(){
        return R.ok().put("name",name).put("age",age);
    }


}
